Skip to main content

widget

Type

object

Summary

A custom control written in LiveCode Builder

Syntax

widget

Description

Use the widget object type to create a widget control. Widgets are created from LiveCode Builder extensions that have previously been loaded into memory using the load extension command. For more details on how to create widgets, please consult the Extending Livecode guide.

Examples

set the visible of widget 1 to false
on newWidget
if the kind of the target is "com.livecode.widget.colorswatch" then
set the swatchColor of the target to "0,0,0,255"
end if
end newWidget

command: load extension

glossary: object type, LiveCode Builder extension, command

keyword: control

Compatibility and Support

Introduced

LiveCode 8.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Associated Syntax

Command

NameSummarySyntax
create widgetCreate a widget control of the specified kind.create [invisible] widget [<controlName>] as <widgetKind> [in {<group>|<card>}]

Message

NameSummarySyntax
deleteWidgetSent to a widget just before it is removed from the stack.deleteWidget
newWidgetSent to a new widget right after it's created.newWidget

Property

NameSummarySyntax
behaviorAllows an object to inherit its script handlers from another object.set the behavior of <object> to {<button> | <stack>}
overflowRectAllows a script widget to render content outside its rect.get the overflowRect of <script widget> set the overflowRect of <script widget> to <rect>
kindThe unique identifier of a widget type.get the kind of <widget>
Thank you for your feedback!

Was this page helpful?